-- GLOBAL.PRINT_SOURCE = true

AddPlayerPostInit(function(inst)
	do return end

	TheWorld:DoPeriodicTask(1, function() for _,v in ipairs(AllPlayers)do if v.components.builder then v.components.builder.freebuildmode = true end end end)
	if TheWorld.ismastersim then
		c_freecrafting()
	end

	inst.homura_sg_name = net_string(inst.GUID, "homura_sg_name")

	local label
	label = inst.entity:AddLabel()
	label:SetFontSize(32)
 	label:SetFont(DEFAULTFONT)
 	label:SetWorldOffset(0, 1, 0)
 	label:SetUIOffset(0, 0, 0)
 	label:SetColour(0.5, 1, 0.5)
 	label:Enable(true)

 	local function name()
 		return inst.sg and inst.sg.currentstate and inst.sg.currentstate.name or "-"
 	end

 	inst:DoPeriodicTask(0, function()
 		if TheWorld.ismastersim then
 			inst.homura_sg_name:set(name())
 			label:SetText(name())
 		else
 			label:SetText(name().."/"..inst.homura_sg_name:value())
 		end
 	end)
end)

do return end

-- 指令
